package com.study.advice;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

//Advisor方式的环绕通知
public class AroundAdvice implements MethodInterceptor {

    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        System.out.println("Advisor方式的环绕通知的前置通知");
        Object obj = methodInvocation.proceed();
        System.out.println("Advisor方式的环绕通知的后置通知");
        return obj;
    }

}
